package com.huayue.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.huayue.annotation.LogAnno;
import com.huayue.entity.RoomProductType;
import com.huayue.service.RoomProductTypeService;
import com.huayue.util.PageHelper;

/**
 * 房间类型商品（暂未用）
 */
@Controller
@RequestMapping("/roomProductType")
public class RoomProductTypeController {
    @Autowired
    RoomProductTypeService svc;

    BaseController bc = new BaseController();

    @LogAnno(operateType = "添加-房间类型房内物品")
    @RequestMapping("/add")
    public ModelAndView add(RoomProductType room_product_type) {
        return bc.add(svc, room_product_type);
    }

    @LogAnno(operateType = "修改-房间类型房内物品")
    @RequestMapping("/update")
    public ModelAndView update(RoomProductType room_product_type) {
        return bc.update(svc, room_product_type);
    }

    @LogAnno(operateType = "删除-房间类型房内物品")
    @RequestMapping("/delete")
    public ModelAndView delete(RoomProductType room_product_type) {
        return bc.delete(svc, room_product_type);
    }

    @RequestMapping(value = "/findOne", produces = {"text/javascript;charset=UTF-8"})
    @ResponseBody
    public ModelAndView findOne(RoomProductType room_product_type) {
        return bc.findOne(svc, room_product_type);
    }

    @RequestMapping("/findPage")
    public ModelAndView findPage(PageHelper page, RoomProductType room_product_type) {
        return bc.findPage(svc, page, room_product_type, room_product_type);
    }
}
